package com.neuedu.service.impl;

import com.neuedu.bean.Food;
import com.neuedu.mapper.FoodMapper;
import com.neuedu.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodServiceImpl implements FoodService {

    @Autowired
    private FoodMapper foodMapper ;

    @Override
    public List<Food> listFoodByBusinessId(Integer businessId) throws Exception {
        List<Food> foodList = foodMapper.listFoodByBusinessId(businessId);
        return foodList;
    }

    @Override
    public Food getFoodById(Integer foodId) throws Exception {
        return foodMapper.getFoodById(foodId);
    }


}
